home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Applications 2004 April / SGI IRIX 6.5 Applications 2004 April.iso / dist / media_warehouse.idb / usr / share / catman / u_man / cat3 / MediaViewer.z / MediaViewer
Text File  |  1998-05-04  |  10KB  |  265 lines

  1.  
  2.  
  3.  
  4. MMMMEEEEDDDDIIIIAAAAVVVVIIIIEEEEWWWWEEEERRRR((((3333))))                                                  MMMMEEEEDDDDIIIIAAAAVVVVIIIIEEEEWWWWEEEERRRR((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      MediaViewer - a ViewKit class for viewing media files and data
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      VkComponent
  13.  
  14. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  15.      #include <MediaViewer/MediaViewer.h>
  16.  
  17. LLLLIIIIBBBBRRRRAAAARRRRYYYY
  18.      /usr/lib/libMediaViewer.so
  19.  
  20. PPPPUUUUBBBBLLLLIIIICCCC PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
  21.    CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr aaaannnndddd DDDDeeeessssttttrrrruuuuccccttttoooorrrr
  22.      MediaViewer(const char *name, Widget parent);
  23.  
  24.      virtual ~MediaViewer();
  25.  
  26.      static VkComponent *CreateMediaViewer(const char *name,
  27.           Widget parent);
  28.  
  29.  
  30.    VVVViiiieeeewwww FFFFuuuunnnnccccttttiiiioooonnnnssss
  31.      virtual void viewFile(const char *filename);
  32.  
  33.      virtual void viewData(const char *name, Atom type,
  34.           void *data, unsigned long length);
  35.  
  36.      virtual void viewData(const char *name, const char *type,
  37.           void *data, unsigned long length);
  38.  
  39.  
  40.    AAAAcccccccceeeessssssss FFFFuuuunnnnccccttttiiiioooonnnnssss
  41.      virtual const char *getFtrTypeName();
  42.  
  43.      virtual const char *getFtrDescription();
  44.  
  45.      virtual const char *getTargetName();
  46.  
  47.  
  48. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  49.      The _M_e_d_i_a_V_i_e_w_e_r class is a simple ViewKit (see VVVViiiieeeewwwwKKKKiiiitttt((((3333))))) application
  50.      programming interface to the _M_e_d_i_a_W_a_r_e_h_o_u_s_e media viewer framework.
  51.  
  52.      MediaViewer allows ViewKit-based applications to view media data within
  53.      the applications' user interface.  By default, MediaViewer supports
  54.      viewers for a variety of media types, including image, audio, movie, 3D
  55.      models, text, and HTML.
  56.  
  57.      The viewers are dynamically loaded DSOs (see DDDDSSSSOOOO((((5555))))) so end users may add
  58.      new viewers or change the configuration of the existing viewers.  For
  59.      more information on these customizations, see the ``Adding New Data Types
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. MMMMEEEEDDDDIIIIAAAAVVVVIIIIEEEEWWWWEEEERRRR((((3333))))                                                  MMMMEEEEDDDDIIIIAAAAVVVVIIIIEEEEWWWWEEEERRRR((((3333))))
  71.  
  72.  
  73.  
  74.      and Viewers'' section later in this man page.
  75.  
  76.  
  77. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  78.      MediaViewer(const char *name, Widget parent);
  79.  
  80.           The constructor initializes the MediaViewer framework.  _n_a_m_e is used
  81.           by the VkComponent base class.  The widget parent identifies the
  82.           MediaViewer's position in the application's widget hierarchy.  The
  83.           application may, if necessary, set constraints on the MediaViewer's
  84.           ViewKit base widget.
  85.  
  86.  
  87.      static VkComponent *CreateMediaViewer(const char *name, Widget parent);
  88.  
  89.           _C_r_e_a_t_e_M_e_d_i_a_V_i_e_w_e_r() is a convenience function that constructs a
  90.           MediaViewer object and returns a pointer to the VkComponent base
  91.           class.  Applications may free this object via the virtual
  92.           destructor.
  93.  
  94.  
  95.      virtual void viewFile(const char *filename);
  96.  
  97.           The _v_i_e_w_F_i_l_e() method displays the contents of the specified file in
  98.           the viewer.  _v_i_e_w_F_i_l_e() uses the Indigo Magic file typing rules (see
  99.           ffffttttrrrr((((1111))))) to determine which viewer to use.
  100.  
  101.  
  102.      virtual void viewData(const char *name, Atom type,
  103.           void *data, unsigned long length);
  104.  
  105.      virtual void viewData(const char *name, const char *type,
  106.           void *data, unsigned long length);
  107.  
  108.           The _v_i_e_w_D_a_t_a() methods allow applications to specify data in-line
  109.           (i.e., not in a file).  The _n_a_m_e is passed to the viewer, which will
  110.           usually use it as a title.  The _t_y_p_e, which may be specified as
  111.           either an atom or as a string, is the X Inter-Client Communication
  112.           Conventions Manual (ICCCM) target type for this piece of data.  The
  113.           _d_a_t_a itself is specified by a pointer and a _l_e_n_g_t_h in bytes.
  114.  
  115.           Note that many of the default viewers do not support in-line data.
  116.  
  117.  
  118.      virtual const char *getFtrTypeName();
  119.  
  120.           After a file is viewed with _v_i_e_w_F_i_l_e(), _g_e_t_F_t_r_T_y_p_e_N_a_m_e() returns the
  121.           FTR name for the file.
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. MMMMEEEEDDDDIIIIAAAAVVVVIIIIEEEEWWWWEEEERRRR((((3333))))                                                  MMMMEEEEDDDDIIIIAAAAVVVVIIIIEEEEWWWWEEEERRRR((((3333))))
  137.  
  138.  
  139.  
  140.      virtual const char *getFtrDescription();
  141.  
  142.           After a file is viewed with _v_i_e_w_F_i_l_e(), _g_e_t_F_t_r_T_y_p_e_N_a_m_e() returns the
  143.           FTR description for the file.
  144.  
  145.  
  146.      virtual const char *getTargetName();
  147.  
  148.           After a file is viewed with _v_i_e_w_F_i_l_e(), _g_e_t_F_t_r_T_y_p_e_N_a_m_e() returns the
  149.           ICCCM target name for the file's data.
  150.  
  151.  
  152. IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  153.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCoooommmmppppoooonnnneeeennnntttt
  154.      show(), hide(), name(), className(), baseWidget(),
  155.      installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
  156.      setDefaultResources(), getResources(), okToQuit(), _name, _baseWidget,
  157.      _w, deleteCallback
  158.  
  159.  
  160. LLLLIIIINNNNKKKKIIIINNNNGGGG WWWWIIIITTTTHHHH MMMMEEEEDDDDIIIIAAAAVVVVIIIIEEEEWWWWEEEERRRR
  161.      MediaViewer requires the MediaViewer library as well as the ViewKit,
  162.      Motif, and X libraries.  A typical compile command is:
  163.  
  164.      CC -o sample sample.c++ -lMediaViewer -lvk -lvkhelp -lSgm -lXm -lXt -lX11
  165.  
  166.  
  167. AAAADDDDDDDDIIIINNNNGGGG NNNNEEEEWWWW DDDDAAAATTTTAAAA TTTTYYYYPPPPEEEESSSS AAAANNNNDDDD VVVVIIIIEEEEWWWWEEEERRRRSSSS
  168.      By default, MediaViewer provides viewers for popular image, audio, movie,
  169.      3D, and text data formats.  You may add additional viewers, if you wish.
  170.  
  171.      The viewers are configured via the /_u_s_r/_l_i_b/_m_e_d_i_a_w/_m_e_d_i_a_w_r_c file.  The
  172.      file maps FTR names and ICCCM target types with viewer DSOs.  If you wish
  173.      to add a viewer for a new data type, specify the viewer in this format:
  174.  
  175.           _t_a_r_g_e_t__t_y_p_e.viewer: _v_i_e_w_e_r__D_S_O__n_a_m_e
  176.  
  177.           _F_T_R__n_a_m_e.targetType: _t_a_r_g_e_t__t_y_p_e
  178.  
  179.      The first line maps the target type to the DSO.  The second line maps FTR
  180.      names to target names for data that is read from files.
  181.  
  182.  
  183.      _F_T_R__n_a_m_e is the FTR (see FFFFTTTTRRRR((((1111)))))name.  _t_a_r_g_e_t__t_y_p_e is the target type.
  184.      _v_i_e_w_e_r__D_S_O__n_a_m_e is the name of the DSO (see DDDDSSSSOOOO((((5555))))) containing the viewer
  185.      procedures.
  186.  
  187.  
  188.      The DSO should provide these functions:
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. MMMMEEEEDDDDIIIIAAAAVVVVIIIIEEEEWWWWEEEERRRR((((3333))))                                                  MMMMEEEEDDDDIIIIAAAAVVVVIIIIEEEEWWWWEEEERRRR((((3333))))
  203.  
  204.  
  205.  
  206.           extern "C" {
  207.               void *create(Widget);
  208.               void view(void* handle,
  209.                   Atom type, void* data, unsigned long length);
  210.               void hide(void* handle);
  211.               void destroy(void* handle);
  212.           };
  213.  
  214.      The _c_r_e_a_t_e function should create the viewer using the specified widget
  215.      as its parent and return a handle to the viewer.  The handle is passed as
  216.      the first argument to the other three functions.
  217.  
  218.      The _v_i_e_w function should map and view the data.  It is called with an X
  219.      atom representing the ICCCM target type, a pointer to the data, and the
  220.      length of the data.  The data may be a file name, for file-based target
  221.      types.
  222.  
  223.      The _h_i_d_e and _d_e_s_t_r_o_y functions are optional.  If provided, they will be
  224.      called when the viewer is unmapped and destroyed, respectively.
  225.  
  226.  
  227. FFFFIIIILLLLEEEESSSS
  228.      /usr/lib/mediaw/mediawrc - MediaWarehouse viewer framework  configuration
  229.      file
  230.  
  231.  
  232. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  233.      ftr(1), ViewKit(3), VkComponent(3), DSO(5), _I_n_t_e_r-_C_l_i_e_n_t _C_o_m_m_u_n_i_c_a_t_i_o_n
  234.      _C_o_n_v_e_n_t_i_o_n_s _M_a_n_u_a_l
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.